<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ page import="com.hs.pre.model.*" %>
<%@ page import="com.hs.*" %>
<%@ page import="com.hs.utils.*" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
List docList = (List)request.getAttribute("resultDoc");
PreEntry entry = (PreEntry)docList.get(0);
if(docList != null && docList.size()>0){

}
Map  param = (Map)request.getAttribute("params");
Utilities.parserParama(param.get("q")+"");
String title = Environment.getValue(Environment.PROP_APP_TITLE);
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> 
<HTML><HEAD>
<base href="<%=basePath%>">
<TITLE><%=title %></TITLE>
<META http-equiv=content-type content=text/html;charset=UTF-8>
	<link rel="stylesheet" type="text/css" href="<%=basePath%>app/ext/resources/css/ext-all.css" />
    <link rel="stylesheet" type="text/css" href="<%=basePath%>app/search/slider.css" />
    <!-- GC -->
 	<!-- LIBS -->
 	
 	<script type="text/javascript" src="<%=basePath%>app/ext/adapter/ext/ext-base.js"></script>
 	<!-- ENDLIBS -->
    <script type="text/javascript" src="<%=basePath%>app/ext/ext-all.js"></script>
    <script type="text/javascript" src="<%=basePath%>app/ext/adapter/locale/ext-lang-zh_CN.js"></script>
	<script type="text/javascript" src="<%=basePath%>app/search/SliderTip.js"></script>
	<script type="text/javascript" src="<%=basePath%>app/js/perinfo.js"></script>
<STYLE>.header TD {
	PADDING-RIGHT: 4px; BORDER-TOP: #36c 1px solid
}
BODY {
 
	FONT-FAMILY: arial,sans-serif
}

TD {
	FONT-FAMILY: arial,sans-serif
	font-size: 14px;
}
DIV {
	FONT-FAMILY: arial,sans-serif
}
.p {
	FONT-FAMILY: arial,sans-serif
}
A {
	FONT-FAMILY: arial,sans-serif
}
#pagetitle {
	FONT-SIZE: larger
}
#navlinks {
	FONT-SIZE: smaller
}
#source {
	WIDTH: 100%
}
INPUT#url {
	WIDTH: 100%
}
FORM {
	MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px; PADDING-BOTTOM: 0px; PADDING-TOP: 0px
}
#source {
	OVERFLOW: auto; HEIGHT: 100%
}
OPTION.line-above {
	BORDER-TOP: #ddd 1px solid; MARGIN-TOP: -1px
}
TABLE#texttable {
	WIDTH: 100%
}
TABLE#webtable {
	WIDTH: 100%
}
TABLE#suggesttable {
	WIDTH: 100%
}
H4 {
	PADDING-RIGHT: 0.5em; MARGIN-TOP: 1em; PADDING-LEFT: 0.5em; BACKGROUND: #e5ecf9; MARGIN-BOTTOM: 0.5em; PADDING-BOTTOM: 0.2em; PADDING-TOP: 0.2em
}
#texttable TABLE {
	PADDING-RIGHT: 0px; PADDING-LEFT: 0px; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px
}
#texttable TABLE TD {
	PADDING-RIGHT: 0px; PADDING-LEFT: 0px; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px
}
#texttable #submitcell SELECT {
	PADDING-RIGHT: 0px; PADDING-LEFT: 0px; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px
}
#texttable #submitcell TABLE {
	WIDTH: 100%
}
#selectcell {
	WIDTH: 100%
}
#result_box {
	FONT: 12pt monospace
}
#source {
	FONT: 10pt monospace
}
.almost_half_cell {
	WIDTH: 49%
}
#gap {
	WIDTH: 2%; HEIGHT: 128px
}
#original_text {
	FONT-SIZE: smaller
}
#autotrans {
	FONT-SIZE: smaller
}
.highlight {
	BACKGROUND: #f5f5f5
}
.footer {
	BORDER-TOP: #ccc 1px solid; MARGIN-TOP: 2.5em; FONT-SIZE: smaller; PADDING-TOP: 1em; TEXT-ALIGN: center
}






body {
	background: #FFF;
	color: #000;
	font: normal normal 12px Verdana, Geneva, Arial, Helvetica, sans-serif;
	margin: 10px;
	padding: 0
}

table, td, a {
	color: #000;
	font: normal normal 12px Verdana, Geneva, Arial, Helvetica, sans-serif
}

h1 {
	font: normal normal 18px Verdana, Geneva, Arial, Helvetica, sans-serif;
	margin: 0 0 5px 0
}

h2 {
	font: normal normal 16px Verdana, Geneva, Arial, Helvetica, sans-serif;
	margin: 0 0 5px 0
}

h3 {
	font: normal normal 13px Verdana, Geneva, Arial, Helvetica, sans-serif;
	color: #008000;
	margin: 0 0 15px 0
}
/* end basic styling                                 */

/* define height and width of scrollable area. Add 16px to width for scrollbar          */
div.tableContainer {
	clear: both;
	border: 1px solid #963;
	height: 285px;
	overflow: auto;
	width: 756px
}

/* Reset overflow value to hidden for all non-IE browsers. */
html>body div.tableContainer {
	overflow: hidden;
	width: 756px
}

/* define width of table. IE browsers only                 */
div.tableContainer table {
	float: left;
	width: 740px
}

/* define width of table. Add 16px to width for scrollbar.           */
/* All other non-IE browsers.                                        */
html>body div.tableContainer table {
	width: 756px
}

/* set table header to a fixed position. WinIE 6.x only                                       */
/* In WinIE 6.x, any element with a position property set to relative and is a child of       */
/* an element that has an overflow property set, the relative value translates into fixed.    */
/* Ex: parent element DIV with a class of tableContainer has an overflow property set to auto */
thead.fixedHeader tr {
	position: relative
}

/* set THEAD element to have block level attributes. All other non-IE browsers            */
/* this enables overflow to work on TBODY element. All other non-IE, non-Mozilla browsers */
html>body thead.fixedHeader tr {
	display: block
}

/* make the TH elements pretty */
thead.fixedHeader th {
	background: #C96;
	border-left: 1px solid #EB8;
	border-right: 1px solid #B74;
	border-top: 1px solid #EB8;
	font-weight: normal;
	padding: 4px 3px;
	text-align: left
}

/* make the A elements pretty. makes for nice clickable headers                */
thead.fixedHeader a, thead.fixedHeader a:link, thead.fixedHeader a:visited {
	color: #FFF;
	display: block;
	text-decoration: none;
	width: 100%
}

/* make the A elements pretty. makes for nice clickable headers                */
/* WARNING: swapping the background on hover may cause problems in WinIE 6.x   */
thead.fixedHeader a:hover {
	color: #FFF;
	display: block;
	text-decoration: underline;
	width: 100%
}

/* define the table content to be scrollable                                              */
/* set TBODY element to have block level attributes. All other non-IE browsers            */
/* this enables overflow to work on TBODY element. All other non-IE, non-Mozilla browsers */
/* induced side effect is that child TDs no longer accept width: auto                     */
html>body tbody.scrollContent {
	display: block;
	height: 262px;
	overflow: auto;
	width: 100%
}

/* make TD elements pretty. Provide alternating classes for striping the table */
/* http://www.alistapart.com/articles/zebratables/                             */
tbody.scrollContent td, tbody.scrollContent tr.normalRow td {
	background: #FFF;
	border-bottom: none;
	border-left: none;
	border-right: 1px solid #CCC;
	border-top: 1px solid #DDD;
	padding: 2px 3px 3px 4px
}

tbody.scrollContent tr.alternateRow td {
	background: #EEE;
	border-bottom: none;
	border-left: none;
	border-right: 1px solid #CCC;
	border-top: 1px solid #DDD;
	padding: 2px 3px 3px 4px
}
</STYLE>
<META content="MSHTML 6.00.2900.3268" name=GENERATOR></HEAD>
<BODY vLink=#551a8b aLink=#ff0000 link=#0000cc bgColor=#ffffff >
<TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
  <TBODY>
  <TR> 
    <TD noWrap>
      
<TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
  <TBODY>
  <TR>
    <TD vAlign=top width="1%"><A href="http://www.aoqikeji.net/">
        <IMG height=55 alt=方泉 src="<%=path %>/app/images/logo1.gif" width=150 border=0></A></TD>
    <TD>&nbsp;</TD>
    <TD noWrap>
      <TABLE class=header cellSpacing=0 cellPadding=0 width="100%" border=0>
        <TBODY>
        <TR>
          <TD noWrap bgColor=#e5ecf9><FONT size=+3><B>&nbsp;【<font color=red><%=entry.getFangm() %></font>】方剂</B></FONT></TD>
          <TD noWrap align=right bgColor=#e5ecf9><FONT face=arial,sans-serif 
            size=-1><A href="http://www.aoqikeji.net"> </A></FONT></TD>
          </TR>
        </TBODY>
      </TABLE></TD></TR></TBODY></TABLE>
<P></P>
<H4>方剂详细信息</H4>
<table width="100%" border="1" cellpadding="0" cellspacing="0" bordercolor="#E6E6E6">
	<tr>
		<td width="10%"><strong>药物组成</strong></td>
			<td><%=entry.getYaowzc() %></td>
	</tr>
	<tr>
		<td><strong>处方来源</strong></td>
		<td><%=entry.getChufly() %>&nbsp;</td>
	</tr>
	<tr>
		<td><strong>用法用量</strong></td>
		<td><%=entry.getYongfyl() %>&nbsp;</td>
	</tr>
	<tr>
		<td><strong>主治</strong></td><td><%=entry.getZhuz() %>&nbsp;</td>
	</tr>
	<tr>
		<td><strong>功效</strong></td><td><%=entry.getGongx() %>&nbsp;</td>
	</tr>
	<tr>
		<td><strong>加减</strong></td><td><a href="/pre/app/tree.jsp?id=<%=entry.getId()%>" target="_blank">查看中药加减变化</a></td>
	</tr>
	<tr bgcolor="#DF7401">
		<td colspan="2"  align="right" noWrap="noWrap">
		<div style="float:right"> &nbsp;<input type="button" value="确定" onclick="changeSim();">&nbsp;&nbsp;&nbsp;</div>
		<div style="float:right" id="resemble"></div>
		<div style="float:right"  >默认最小相似度：0.6 ，调节为：</div>
</td>
	</tr>
</table>

<P></P>
<P></P>
<TABLE cellSpacing=0 cellPadding=3 width="100%" border=0>
 <tr>
	<td colspan="2">
		<table border="1" cellpadding="0" cellspacing="0" width="100%" >
			<tr>
				<td colspan="2" ><H4>
											名称相似方剂（<input type="text" style="border:0;font:bold 17px;" size="1" value="0" readonly="true" id="MCnumber"> 首）
										</H4></td>
			</tr>
			<tr>
				<td colspan="2">
				<table>
				<tbody id="MCT" class="scrollContent">
				<tr>
					<td>And Repeat 1</td>
					<td>And Repeat 2</td>
					<td>And Repeat 3</td>
				</tr>
				<tr>
					<td>Cell Content 1</td>
					<td>Cell Content 2</td>
					<td>Cell Content 3</td>
				</tr>
				<tr>
					<td>More Cell Content 1</td>
					<td>More Cell Content 2</td>
					<td>More Cell Content 3</td>
				</tr>
				<tr>
					<td>Even More Cell Content 1</td>
					<td>Even More Cell Content 2</td>
					<td>Even More Cell Content 3</td>
				</tr>
				<tr>
					<td>And Repeat 1</td>
					<td>And Repeat 2</td>
					<td>And Repeat 3</td>
				</tr>
				<tr>
					<td>Cell Content 1</td>
					<td>Cell Content 2</td>
					<td>Cell Content 3</td>
				</tr>
				<tr>
					<td>More Cell Content 1</td>
					<td>More Cell Content 2</td>
					<td>More Cell Content 3</td>
				</tr>
			</tbody></table>
				</td>
			</tr>
			<tr>
				<td colspan="2" height="35"><H4>
											组成药相似方剂（<input type="text" style="border:0;font:bold 17px;" size="1" value="0" readonly="true" id="YWZCnumber">首）
										</H4></td>
			</tr>
	   <tr><td colspan="2">
			
			<table>
				<tbody id="YWZCT" class="scrollContent">
				<tr>
					<td>And Repeat 1</td>
					<td>And Repeat 2</td>
					<td>And Repeat 3</td>
				</tr>
				<tr>
					<td>Cell Content 1</td>
					<td>Cell Content 2</td>
					<td>Cell Content 3</td>
				</tr>
				<tr>
					<td>More Cell Content 1</td>
					<td>More Cell Content 2</td>
					<td>More Cell Content 3</td>
				</tr>
				<tr>
					<td>Even More Cell Content 1</td>
					<td>Even More Cell Content 2</td>
					<td>Even More Cell Content 3</td>
				</tr>
				<tr>
					<td>And Repeat 1</td>
					<td>And Repeat 2</td>
					<td>And Repeat 3</td>
				</tr>
				<tr>
					<td>Cell Content 1</td>
					<td>Cell Content 2</td>
					<td>Cell Content 3</td>
				</tr>
				<tr>
					<td>More Cell Content 1</td>
					<td>More Cell Content 2</td>
					<td>More Cell Content 3</td>
				</tr>
			</tbody></table>
			
			</td></tr>
			
			
		<tr>
			<td colspan="2" height="35"><H4>
											功效相似方剂（<input type="text" style="border:0;font:bold 17px;" size="1" value="0" readonly="true" id="GXnumber">首）
										</H4></td>
		</tr>
		<tr><td colspan="2">
			<table>
				<tbody id="GXT" class="scrollContent">
				<tr>
					<td>And Repeat 1</td>
					<td>And Repeat 2</td>
					<td>And Repeat 3</td>
				</tr>
				<tr>
					<td>Cell Content 1</td>
					<td>Cell Content 2</td>
					<td>Cell Content 3</td>
				</tr>
				<tr>
					<td>More Cell Content 1</td>
					<td>More Cell Content 2</td>
					<td>More Cell Content 3</td>
				</tr>
				<tr>
					<td>Even More Cell Content 1</td>
					<td>Even More Cell Content 2</td>
					<td>Even More Cell Content 3</td>
				</tr>
				<tr>
					<td>And Repeat 1</td>
					<td>And Repeat 2</td>
					<td>And Repeat 3</td>
				</tr>
				<tr>
					<td>Cell Content 1</td>
					<td>Cell Content 2</td>
					<td>Cell Content 3</td>
				</tr>
				<tr>
					<td>More Cell Content 1</td>
					<td>More Cell Content 2</td>
					<td>More Cell Content 3</td>
				</tr>
			</tbody></table>
			
			</td></tr>
		<tr>
			<td colspan="2" height="35"><H4>
											主治相似方剂（<input type="text" style="border:0;font:bold 17px;" size="1" value="0" readonly="true" id="ZZnumber">首）
										</H4></td>
		</tr>
		<tr><td colspan="2">
			<table class="scrollContent">
				<tbody id="ZZT">
				<tr>
					<td>And Repeat 1</td>
					<td>And Repeat 2</td>
					<td>And Repeat 3</td>
				</tr>
				<tr>
					<td>Cell Content 1</td>
					<td>Cell Content 2</td>
					<td>Cell Content 3</td>
				</tr>
				<tr>
					<td>More Cell Content 1</td>
					<td>More Cell Content 2</td>
					<td>More Cell Content 3</td>
				</tr>
				<tr>
					<td>Even More Cell Content 1</td>
					<td>Even More Cell Content 2</td>
					<td>Even More Cell Content 3</td>
				</tr>
				<tr>
					<td>And Repeat 1</td>
					<td>And Repeat 2</td>
					<td>And Repeat 3</td>
				</tr>
				<tr>
					<td>Cell Content 1</td>
					<td>Cell Content 2</td>
					<td>Cell Content 3</td>
				</tr>
				<tr>
					<td>More Cell Content 1</td>
					<td>More Cell Content 2</td>
					<td>More Cell Content 3</td>
				</tr>
				</tbody>
			</table>
			</td></tr>
</table>
                   
  
</BODY></HTML>
<script>
 var slider = null;
Ext.onReady(function(){
  var tip = new Ext.ux.SliderTip({
        getText: function(slider){
        var v = "";
        if(slider.getValue()==10)
        	v = "1";
        else{
            v="0."+slider.getValue();
        }
            return String.format('<b>相似度'+v+'</b>', slider.getValue());
        }
    });
  slider = new Ext.Slider({
        renderTo: 'resemble',
        width: 100,
        increment: 1,
        minValue: 6,
        maxValue: 10,
        plugins: tip
    });
});
var preId="<%=entry.getId() %>";
initper(preId,0.6,true);
function changeSim()
{		var v = "";
		if(slider.getValue()==10)
        	v = "1";
        else{
            v="0."+slider.getValue();
        }
		initper(preId,v,false);
}
</script>